<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>Parallel Gaussian Process Regression: pgpr_data Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Parallel Gaussian Process Regression
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   <div id="projectbrief">The implementation of parallel Gaussian process (GP) regression is based on the following publication: Jie Chen, Nannan Cao, Kian Hsiang Low, Ruofei Ouyang, Colin Keng-Yan Tan &amp; Patrick Jaillet. Parallel Gaussian Process Regression with Low-Rank Covariance Matrix Approximations. In Proceedings of the 29th Conference on Uncertainty in Artificial Intelligence (UAI 2013), Bellevue, WA, Jul 11-15, 2013.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classpgpr__data-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">pgpr_data Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class provides functionalities of preparing train data, test set and support set.  
 <a href="classpgpr__data.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="pgpr__data_8h_source.html">pgpr_data.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa6879cea28bfba9c8a3fbd87df02a92c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#aa6879cea28bfba9c8a3fbd87df02a92c">pgpr_data</a> (<a class="el" href="classpgpr__parse.html">pgpr_parse</a> cfg, Int an, Int tn)</td></tr>
<tr class="memdesc:aa6879cea28bfba9c8a3fbd87df02a92c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aa6879cea28bfba9c8a3fbd87df02a92c">More...</a><br /></td></tr>
<tr class="separator:aa6879cea28bfba9c8a3fbd87df02a92c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accb6162698eefa8c8826205a21ad18ab"><td class="memItemLeft" align="right" valign="top">Int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#accb6162698eefa8c8826205a21ad18ab">getTestSet</a> (Int tsize, <a class="el" href="classpgpr__matrix.html">Mdoub</a> &amp;test)</td></tr>
<tr class="memdesc:accb6162698eefa8c8826205a21ad18ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a random subset of data for testing purpose.  <a href="#accb6162698eefa8c8826205a21ad18ab">More...</a><br /></td></tr>
<tr class="separator:accb6162698eefa8c8826205a21ad18ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa826857a19458c7ec5dde1b9109f3b07"><td class="memItemLeft" align="right" valign="top">Int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#aa826857a19458c7ec5dde1b9109f3b07">getTrainSet</a> (Int mode)</td></tr>
<tr class="memdesc:aa826857a19458c7ec5dde1b9109f3b07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of training data.  <a href="#aa826857a19458c7ec5dde1b9109f3b07">More...</a><br /></td></tr>
<tr class="separator:aa826857a19458c7ec5dde1b9109f3b07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a569dc41fa124c739d28d05d56874d4c4"><td class="memItemLeft" align="right" valign="top">Int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#a569dc41fa124c739d28d05d56874d4c4">getRandomBlk</a> ()</td></tr>
<tr class="memdesc:a569dc41fa124c739d28d05d56874d4c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of training data based on a simple clustering scheme.  <a href="#a569dc41fa124c739d28d05d56874d4c4">More...</a><br /></td></tr>
<tr class="separator:a569dc41fa124c739d28d05d56874d4c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b0b0b000a221c160339ea4207910753"><td class="memItemLeft" align="right" valign="top">Int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#a1b0b0b000a221c160339ea4207910753">getRandomWalk</a> ()</td></tr>
<tr class="memdesc:a1b0b0b000a221c160339ea4207910753"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of training data based on random walk. Note that, it is applicable only if the domain contains topology information.  <a href="#a1b0b0b000a221c160339ea4207910753">More...</a><br /></td></tr>
<tr class="separator:a1b0b0b000a221c160339ea4207910753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accef69857141cfa9e7b415edab6e2899"><td class="memItemLeft" align="right" valign="top">Int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#accef69857141cfa9e7b415edab6e2899">selMaxVar</a> (<a class="el" href="classpgpr__matrix.html">Mdoub</a> dset, Int dnum, Int anum, <a class="el" href="classpgpr__matrix.html">Mdoub</a> &amp;aset)</td></tr>
<tr class="memdesc:accef69857141cfa9e7b415edab6e2899"><td class="mdescLeft">&#160;</td><td class="mdescRight">Actively select an informative subset of points.  <a href="#accef69857141cfa9e7b415edab6e2899">More...</a><br /></td></tr>
<tr class="separator:accef69857141cfa9e7b415edab6e2899"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a5b77dc4896f54924681a133309dc5206"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b77dc4896f54924681a133309dc5206"></a>
<a class="el" href="classpgpr__domain.html">pgpr_domain</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#a5b77dc4896f54924681a133309dc5206">domain</a></td></tr>
<tr class="memdesc:a5b77dc4896f54924681a133309dc5206"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a domain. <br /></td></tr>
<tr class="separator:a5b77dc4896f54924681a133309dc5206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a839a49ca4d5de7973463e6203a7e807f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a839a49ca4d5de7973463e6203a7e807f"></a>
<a class="el" href="classpgpr__matrix.html">Mint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpgpr__data.html#a839a49ca4d5de7973463e6203a7e807f">m_sample</a></td></tr>
<tr class="memdesc:a839a49ca4d5de7973463e6203a7e807f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix of indices used as training data. <br /></td></tr>
<tr class="separator:a839a49ca4d5de7973463e6203a7e807f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class provides functionalities of preparing train data, test set and support set. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa6879cea28bfba9c8a3fbd87df02a92c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">pgpr_data::pgpr_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classpgpr__parse.html">pgpr_parse</a>&#160;</td>
          <td class="paramname"><em>cfg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Int&#160;</td>
          <td class="paramname"><em>an</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Int&#160;</td>
          <td class="paramname"><em>tn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cfg</td><td>Configure of domain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">an</td><td>Number of blocks </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tn</td><td>Number of samples that are used for training </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a569dc41fa124c739d28d05d56874d4c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Int pgpr_data::getRandomBlk </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a set of training data based on a simple clustering scheme. </p>
<p>This function follows steps (see Definition 5, remark 2): 1) randomly select a set of K central points; 2) randomly select an unobserved point; 3) allocate it to the closest non-full bin; 4) loop until all bins are full. </p><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>the training data is stored in m_sample_{i,j} where i is the i-th observation and j is the j-th bin. I am considering move m_sample out of member attribute </dd></dl>

</div>
</div>
<a class="anchor" id="a1b0b0b000a221c160339ea4207910753"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Int pgpr_data::getRandomWalk </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a set of training data based on random walk. Note that, it is applicable only if the domain contains topology information. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>the training data is stored in m_sample_{i,j} where i is the i-th observation and j is the j-th bin. I am considering move m_sample out of member attribute </dd></dl>

</div>
</div>
<a class="anchor" id="accb6162698eefa8c8826205a21ad18ab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Int pgpr_data::getTestSet </td>
          <td>(</td>
          <td class="paramtype">Int&#160;</td>
          <td class="paramname"><em>tsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpgpr__matrix.html">Mdoub</a> &amp;&#160;</td>
          <td class="paramname"><em>test</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a random subset of data for testing purpose. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tsize</td><td>Size of test set </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">test</td><td>Set of data for test; each row represents a test point. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa826857a19458c7ec5dde1b9109f3b07"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Int pgpr_data::getTrainSet </td>
          <td>(</td>
          <td class="paramtype">Int&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a set of training data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>different selection algorithms: ALGO1 - Simple clustering algorithm; ALGO2 - Random walk algorithm </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="accef69857141cfa9e7b415edab6e2899"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Int pgpr_data::selMaxVar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classpgpr__matrix.html">Mdoub</a>&#160;</td>
          <td class="paramname"><em>dset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Int&#160;</td>
          <td class="paramname"><em>dnum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Int&#160;</td>
          <td class="paramname"><em>anum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpgpr__matrix.html">Mdoub</a> &amp;&#160;</td>
          <td class="paramname"><em>aset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Actively select an informative subset of points. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dset</td><td>universal set of points </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dnum</td><td>size of the universal set </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">anum</td><td>size of the subset to be selected </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">aset</td><td>the informative subset </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/<a class="el" href="pgpr__data_8h_source.html">pgpr_data.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 5 2015 14:32:10 for Parallel Gaussian Process Regression by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>
